import java.util.Scanner;

/**
 * Created by JiaJia on 2019/3/27 0027.
 */
public class StringSplit {
    public static void main(String[] args) {
        Scanner sc =new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()){
            String input = sc.nextLine();
            stringSplit(sb,input);
            input=sc.nextLine();
            stringSplit(sb,input);
            System.out.print(sb);


        }

        sc.close();
    }

    private static void stringSplit(StringBuilder builder,String str){
        if(str == null||str.length()<1){
            return;
        }

        int pos=0;
        while ((pos=+8)<str.length()){
            builder.append(str.substring(pos-8,pos)).append("\n");

        }

        if(pos>=str.length()){
            builder.append(str.substring(pos-8,str.length()));

            for (int i = str.length(); i <pos ; i++) {
                builder.append(0);
            }

            builder.append("\n");

        }

    }

}